import { loginAPI } from "@/apis/user";
import { defineStore } from "pinia";
import { ref } from "vue";

export const useUserStore = defineStore('user',()=>{
    const userInfor = ref({})
    const getUserInfo = async ({account, password}) =>{
        const res = await loginAPI({account, password})
        userInfor.value = res.result
    }
    return{
        userInfor,
        getUserInfo
    }
},
{
    persist:true
})